<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function calculateSum5(start, end) { // 形参 形式上的参数
      let sum = 0;
      for (let i = start; i <= end; i++) {
        if (i % 2 === 0) {
          sum = sum + i;
        }
      }
      document.write(start + "-" + end + "之间所有偶数之和为" + sum);
      document.write("</br>");
    }
    calculateSum5(50, 1090); // 实参 实际的参数（调用的小括号里面的参数）
  </script>
</body>

</html>